<?php 
class ObjectUpdate extends TPage
{ 
    public function __construct() 
    { 
        parent::__construct(); 
        try 
        { 
            TTransaction::open('samples'); // open transaction 
            $objeto = new Customer; // instantiates customer
            $customer= $objeto->load(31); // load customer 31 
            if ($customer) // if found
            { 
                $customer->phone = '51 8111-3333'; // changes phone 
                $customer->store(); // store the object
            } 
            new TMessage('info', 'Objeto atualizado'); 
            TTransaction::close(); // close the transaction 
        } 
        catch (Exception $e) 
        { 
            new TMessage('error', $e->getMessage()); 
        } 
    } 
} 
?>